package org.come.Jpanel;

import java.awt.Dimension;
import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

import com.tool.btn.FormsOnOffBtn;
import com.tool.btn.TrueFeedbackBtn;

/**
 * @author HGC<br>
 * @time 2020年4月28日 上午9:48:00<br>
 * @class 类名:TrueFeedbackMainJpanel 五一真情回馈面板 编号:109<br>
 */
public class TrueFeedbackMainJpanel extends JPanel {
    
    private TrueFeedbackCardJPanel trueFeedbackCardJPanel;
    private TrueFeedbackBtn btnAddRecharge,btntimeSummon,btnLottey;

    
    public TrueFeedbackMainJpanel() {
        setPreferredSize(new Dimension(502,519));
        setOpaque(false);
        setLayout(null);
        trueFeedbackCardJPanel = new TrueFeedbackCardJPanel();
        trueFeedbackCardJPanel.setBounds(48, 63, 430,450);
        this.add(trueFeedbackCardJPanel);
        // 关闭按钮事件
        FormsOnOffBtn offBtn = new FormsOnOffBtn("inkImg/old/2/1.png", 1, 109);
        offBtn.setBounds(502 - 37, 10, 25, 25);
        this.add(offBtn);
        
        getBtnAddRecharge();
        getBtnLottey();
        getBtntimeSummon();
        
    }

    private ImageIcon icon;
    
    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        if(icon == null){
            icon = new ImageIcon("inkImg/old/background/S193.png");
        }
        g.drawImage(icon.getImage(), 0, 0, null);
    }

    public TrueFeedbackCardJPanel getTrueFeedbackCardJPanel() {
        return trueFeedbackCardJPanel;
    }

    public void setTrueFeedbackCardJPanel(TrueFeedbackCardJPanel trueFeedbackCardJPanel) {
        this.trueFeedbackCardJPanel = trueFeedbackCardJPanel;
    }

    public ImageIcon getIcon() {
        return icon;
    }

    public void setIcon(ImageIcon icon) {
        this.icon = icon;
    }

    public TrueFeedbackBtn getBtnAddRecharge() {
        if(btnAddRecharge == null){
            btnAddRecharge = new TrueFeedbackBtn("skin/8100226/button/B318.png", 1, 0, this);
            btnAddRecharge.setBounds(54, 27, 100, 35);
            this.add(btnAddRecharge);
        }
        return btnAddRecharge;
    }

    public void setBtnAddRecharge(TrueFeedbackBtn btnAddRecharge) {
        this.btnAddRecharge = btnAddRecharge;
    }

    public TrueFeedbackBtn getBtntimeSummon() {
        if(btntimeSummon == null){
            btntimeSummon = new TrueFeedbackBtn("skin/8100226/button/B321.png", 1, 1, this);
            btntimeSummon.setBounds(54+102, 27, 100, 35);
            this.add(btntimeSummon);
        }
        return btntimeSummon;
    }

    public void setBtntimeSummon(TrueFeedbackBtn btntimeSummon) {
        this.btntimeSummon = btntimeSummon;
    }

    public TrueFeedbackBtn getBtnLottey() {
        if(btnLottey == null){
            btnLottey = new TrueFeedbackBtn("skin/8100226/button/B319.png", 1, 2, this);
            btnLottey.setBounds(54+102*2, 27, 100, 35);
            this.add(btnLottey);
        }
        return btnLottey;
    }

    public void setBtnLottey(TrueFeedbackBtn btnLottey) {
        this.btnLottey = btnLottey;
    }
    
    
}
